package com.CodeCraft.utils;

import com.CodeCraft.bean.TableInfo;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * <p>
 * 描述: 转json工具类
 * </p>
 *
 * @author Dorain
 * @version 1.0.0
 * @since 2025/3/31
 */
public class JsonUtils {
    private static final Logger logger = LoggerFactory.getLogger(JsonUtils.class);

    public static String convertToJson(Object obj) {

        if (obj == null){
            return null;
        }
        return JSON.toJSONString(obj, SerializerFeature.DisableCircularReferenceDetect);
    }
}
